const mongoose = require('mongoose');//引入mongoose
const testSchema = new mongoose.Schema({
    AnswerTime:String,
    StayTime:String,
    Title:String,
    KnowledgePointId: {
        type: mongoose.SchemaTypes.ObjectId,
        //关联集合模型，集合模型名在mongoose.model注册的名字
        ref:'knowledgePointsModel'
    },
    TypeId: {
        type: mongoose.SchemaTypes.ObjectId,
        //关联集合模型，集合模型名在mongoose.model注册的名字
        ref:'examTypeModel'
    }
});

const testModel = mongoose.model("testModel", testSchema, "tests");
module.exports = {testModel}